#英雄共用类
class hero:

    #初始化英雄血量和攻击力
    def __init__(self, hp, power):
        self.hp = hp
        self.power = power

    def fight(self, enemy__hp, enemy__power):
        #英雄最终的血量=英雄hp属性-敌人的攻击力enemy_ power
        self.hp = self.hp - enemy__power
        #敌人最终的血量=敌人的血量enemy_ hp—英雄的power属性
        enemy__hp = enemy__hp - self.power
        #返回敌人血量
        return enemy__hp
